<?include_once("includes/header.php");?>
<?
	$strQuery=$_REQUEST["txtQuery"];
//	echo $strQuery;
?>
<form method=post action=ExecSql.php>
<textarea rows=5 cols=80 name=txtQuery style="background:#f2f2f2;color:darkblue"><?=$strQuery?></textarea>
<input type=submit accesskey="G" value=" Go " class="button" >
</form>
<?
	//$strQuery= str_replace("delete","",$strQuery);
	
	$strQuery= str_replace("drop","",$strQuery);
	//$strQuery= str_replace("Delete","",$strQuery);
	$strQuery= str_replace("Update","",$strQuery);
	$strQuery= str_replace("Drop","",$strQuery);
//	echo $strQuery;
//$strQuery=addslashes($strQuery);
echo $strQuery;
if($strQuery!="") 
{
	$result=mysql_query($strQuery);
	$i = 0;

?>
	<div class=div style="overflow:scroll;height:600;width:800;align:left" >
	<table border=1 style="font-family:verdana;font-size:7pt;" width="100%">
	<tr bgcolor=#e6e6e6>
	
	<? 
		while ($i < mysql_num_fields($result)) 
		{
			$meta = mysql_fetch_field($result);
			echo "<td><b>". $meta->name."</b></td>";
			$i++;
		}
		
	?>
	
	</tr>
	<?

	while ($rs=mysql_fetch_array($result)) 
		{ 
			echo "<tr>";
			for($j=0;$j<$i;$j++) echo "<td>".$rs[$j]."</td>";
			echo "</tr>";
		}
		
	?>
	
	
<?
	}
?>


</table>
</div>
<?include_once("includes/footer.php");?>
